@extends('layouts.app')
@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-6">
                @if($active_users)
                   <div class="card">
                       <div class="card-body">
                           <h5 class="card-title">今日激活用户 ({{count($active_users)}})人</h5>
                           <div class="list-group list-group-flush ">
                               @foreach($active_users->take(10) as $user)
                                   <div class="list-group-item">
                                       {{$user->name}}
                                   </div>
                               @endforeach
                           </div>
                       </div>
                   </div>
                @endif

            </div>
            <div class="col-md-6 mt-4 mt-md-0">
                @if($register_users)
                    <div class="card">
                        <div class="card-body">
                            <h5 class="card-title">今日注册用户 ({{count($register_users)}})人</h5>
                            <div class="list-group list-group-flush">
                                @foreach($register_users->take(10) as $user)
                                    <div class="list-group-item">
                                        {{$user->name}}
                                    </div>
                                @endforeach
                            </div>
                        </div>
                    </div>
                @endif
            </div>
            <div class="col mt-4">
               <div class="card">
                   <div class="card-body">
                       <h4 class="card-title text-center">所有用户</h4>
                       <div class="list-group list-group-flush">
                           @foreach($users as $user)
                               <div class="list-group-item">
                                   <a href="{{route('users.show',$user)}}">{{$user->name}}</a>
                                   <span class="ml-4">{{$user->email}}</span>
                               </div>
                           @endforeach
                       </div>

                       {!! $users->render() !!}
                   </div>
               </div>
            </div>
        </div>
    </div>
@endsection
